home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------
- //
- // FleetBar.prg
- //
- // Main toolbar for Fleet application. This toolbar is attached to
- // the fleet form and provides a single click access to the Aircraft,
- // Schedule and Fleet Tree forms.
- //
- // Dependencies: AIRCRAFT.BMP
- // TREE.BMP
- // SCHEDULE.BMP
- //
- // Visual dBASE Samples Group
- //
- // $Revision: 1.2 $
- //
- // Copyright (c) 1997, Borland International, Inc. All rights reserved.
- //
- //------------------------------------------------------------------------
-
- MSGBOX('This file contains the definition for the Fleet application toolbar. ' + ;
- 'Run "Fleet.prg" to see the toolbar.','Alert', 64)
-
- class FleetToolbar( bLarge ) of Toolbar
- this.flat := false
- this.text := "Fleet"
-
- this.tAircraft = new Toolbutton(this)
- with ( this.tAircraft )
- bitmap := "FILE AIRCRAFT.BMP"
- onClick := class::tAircraft_onClick
- endwith
-
-
- this.tTree = new Toolbutton(this)
- with ( this.tTree )
- bitmap := "FILE TREE.BMP"
- onClick := class::tTree_onClick
- endwith
-
- this.tSchedule = new Toolbutton(this)
- with ( this.tSchedule )
- bitmap := "FILE SCHEDULE.BMP"
- onClick := class::tSchedule_onClick
- endwith
-
-
- function tAircraft_onClick
- local bOpen
- bOpen = false
- if TYPE("this.parent.form.app") == "O"
- bOpen := this.parent.form.app.openAircraftForm()
- endif
- return ( bOpen )
-
- function tTree_onClick
- local bOpen
- bOpen = false
- if TYPE("this.parent.form.app") == "O"
- bOpen := this.parent.form.app.openFleetTreeForm()
- endif
- return ( bOpen )
-
- function tSchedule_onClick
- local bOpen
- bOpen = false
- if TYPE("this.parent.form.app") == "O"
- bOpen := this.parent.form.app.openScheduleForm()
- endif
- return ( bOpen )
-
- endclass
-